import java.util.*;
import java.io.*;

class Read {
    StringTokenizer st = new StringTokenizer("");
    BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
    String next() throws IOException {
        while(!st.hasMoreTokens()) {
            st = new StringTokenizer(bf.readLine());
        }
        return st.nextToken();
    }
    String nextLine() throws IOException {
        return bf.readLine();
    }
    int nextInt() throws IOException {
        return Integer.parseInt(next());
    }
    long nextLong() throws IOException {
        return Long.parseLong(next());
    }
    double nextDouble() throws IOException {
        return Double.parseDouble(next());
    }
}

public class day3 {
    /**
     * 除2！
     * https://ac.nowcoder.com/acm/problem/213140
     */
    public static void main3(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int k = in.nextInt();
        PriorityQueue<Integer> queue = new PriorityQueue<>((a,b) -> {
            // 大根堆
            return b - a;
        });

        long sum = 0;
        long num = 0;
        for(int i = 0;i < n;i++) {
            num = in.nextLong();
            sum += num;
            if(num % 2 == 0) {
                // 偶数放入到 堆中
                queue.add((int)num);
            }
        }

        // 之后进行对偶数进行k次处理
        while(!queue.isEmpty() && k-- != 0) {
            int t = queue.poll();
            sum -= t / 2;
            if((t / 2) % 2 == 0) {
                queue.add(t / 2);
            }
        }
        System.out.print(sum);
    }

    /**
     * dd爱框框
     * https://ac.nowcoder.com/acm/problem/221681
     */
    public static PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
    public static Read in = new Read();
    public static void main2(String[] args) throws IOException {
        int n = in.nextInt();
        int target = in.nextInt();
        int[] arr = new int[n + 1];
        for(int i = 1;i <= n;i++) {
            arr[i] = in.nextInt();
        }

        // 使用滑动窗口，进行操作
        int left = 1,right = 1,sum = 0;
        int RetLeft = 0,RetRight = 0,len = 0x3f3f3f3f;
        while(right <= n) {
            // 进窗口
            sum += arr[right];
            // 更新,可能更新很多次，使用while
            while(sum >= target) {
                if(right - left + 1 < len) {
                    // 说明新的区间是小于原来的区间的长度的，所以更新
                    RetLeft = left;
                    RetRight = right;
                    len = right - left + 1;
                }
                // 出窗口
                sum -= arr[left++];
            }
            right++;
        }
        out.println(RetLeft + " " + RetRight);
        out.close();
    }


    /**
     * BC149 简写单词
     * https://www.nowcoder.com/practice/0cfa856bf0d649b88f6260d878f35bb4?tpId=290&tqId=39937&ru=/exam/oj
     */
    public static void main1(String[] args) {
        Scanner in = new Scanner(System.in);
        String[] s = in.nextLine().split(" ");
        for(String str : s) {
            char ch = str.charAt(0);
            if(ch >= 'a' && ch <= 'z') {
                ch = (char)(ch - 32);
            }
            System.out.print(ch);
        }
    }
}
